Part Number Hot Search : 
CX5GM Q4015L9 MF3ICD81 SRF3050 TPSMC22 SRC1204 LTC28 BR10150
Product Description
Full Text Search
 

To Download C161SI-32F Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  semiconductor group 02.99, rel 04 microcontrollers apnote ap1642 in-system programming of c167cs-32f, c161ci-32f and C161SI-32F flash devices (all ax-steps) siemens c167cs-32f/ c161ci-32f/ C161SI-32F 16-bit microcontrollers provide 256 kbytes flash memory on-chip. in-system programming of c167cs-32f/ c161ci-32f/ C161SI-32F flash devices is supported by the otp/ flash/ eeprom memory programming tool memtool. additionally included is a tested bootstrap loader routine. author : peter kliegelh?fer / hl md ae microcontroller application support : additional file ap1642xx.exe available
contents page semiconductor group 2 of 9 ap1642 02.99 c167cs-32f/ c161ci-32f / C161SI-32F flash memory programming (all ax-steps) 1 flash memory overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2 flash memory configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.1 handling of flash addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 3 memtool - the otp/ flash/ eeprom memory programming tool. . . . . . . . . . . . . . . 6 3.1 special memtool options/ hints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 4 flash memory programming drivers overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 ap1642 apnote - revision history actual revision : 02.99 previous revision : 07.98 page of actual rev. page of prev.rel. all all c161ci-32f added 55 chapter handling of flash addresses added 6-9 6-9 memtool.exe and c167cs-32f/ c161ci-32f drivers updated 6-9 6-9 memtool.exe and several driver files updated; formal text changes
semiconductor group 3 of 9 ap1642 02.99 c167cs-32f/ c161ci-32f/ C161SI-32F flash memory programming (all ax-steps) 1. flash memory overview the c167cs-32f/ c161ci-32f/ C161SI-32F devices provide 256 kbytes of flash memory on-chip for both instruction code and constant data. the flash memory is segmented in 8 flash sectors of 32 kbytes each (all ax steps). the lower 32 kbytes of the on-chip flash memory of the c167cs-32f/ c161ci-32f/ C161SI-32F devices can be mapped to either segment 0 (000000 h to 007fff h ) or segment 1 (010000 h to 017fff h ) during the initialization phase to allow external memory to be used for additional system flexibility. the upper 224 kbytes of the on-chip flash memory are assigned to locations 018000 h to 04ffff h (figure 1). figure 1 flash memory configuration page 0bh page 0ah page 09h page 08h page 07h page 06h page 05h page 04h page 03h page 02h page 01h page 00h segment 0 segment 1 segment 2 00'0000 h 00'4000 h 00'8000 h 00'c000 h 01'0000 h 01'4000 h 01'8000 h 01'c000 h 02'0000 h 02'4000 h 02'8000 h 02'c000 h 03'0000 h sector 1 (32k) sector 2 (32k) sector 3 (32k) c16x memory configuration 256 kbyte flash memory mapping flash sector 0 (0 - 32 k) flash sector 0 (0 - 32 k) flash sector 3 (96 - 128 k) flash sector 2 (64 - 96 k) flash sector 1 (32 - 64 k) sector 1 (32k) sector 2 (32k) sector 3 (32k) flash sector 6 (192 - 224 k) flash sector 5 (160 - 192 k) flash sector 4 (128 - 160 k) sector 3 (32k) flash sector 7 (224 - 256 k) page 13h page 12h page 11h page 10h page 0fh page 0eh page 0dh page 0ch segment 4 segment 3 03'4000 h 03'8000 h 03'c000 h 04'0000 h 04'4000 h 04'8000 h 04'c000 h 04'ffff h
semiconductor group 4 of 9 ap1642 02.99 c167cs-32f/ c161ci-32f/ C161SI-32F flash memory programming (all ax-steps) 2 flash memory configuration upon reset the default memory configuration of the c167cs-32f/ c161ci-32f/ C161SI-32F is determined by the state of its ea pin. when ea is low the internal flash memory is disabled and the startup code is fetched from external memory. in order to access the on-chip flash memory after booting from external memory the internal flash memory must be enabled via software by setting bit romen in register syscon. the lower 32 kbytes of the flash memory can be mapped to segment 0 or segment 1, controlled by bit roms1 in register syscon. mapping to segment 1 preserves the external memory containing the startup code, while mapping to segment 0 replaces the lower 32 kbytes of the external memory with on- chip flash memory. in this case a valid vector table must be provided. as the on-chip flash memory covers more than segment 0, segmentation should be enabled (by clearing bit sgtdis in register syscon) in order to map the whole internal flash into the address space. whenever the internal memory configuration of the c167cs-32f/ c161ci-32f/ C161SI-32F is changed (mapping, enabling, disabling) the following procedure must be used to ensure correct operation: l configure the internal flash memory as required l execute an inter-segment branch (jmps, calls, rets) l reload all four dpp registers note: register syscon can only be modified before the execution of the einit instruction. note: for detailed informations concerning the handling of internal non-volatile memory please refer to the users manual, chapter ?system programming (handling the internal rom/ pits, traps and mines).
semiconductor group 5 of 9 ap1642 02.99 c167cs-32f/ c161ci-32f/ C161SI-32F flash memory programming (all ax-steps) 2.1 handling of flash addresses when performing command sequence operations to the 256 kbyte on-chip flash of the c167cs- 32f/ c161ci-32f/ C161SI-32F (all ax steps) one has to consider that the flash physically consists of two separate 128 kbyte blocks which have to be addressed individually . example: flash address 0aaaah in lower 128k flash block: pag = 00 0000 0110b pof = 0010 1010 1010 1010b => final address: 01aaaah (pointer to segment 1) flash address 0aaaah in upper 128k flash block: pag = 00 0000 1110b pof = 0010 1010 1010 1010b => final address: 03aaaah (pointer to segment 3) all flash command, sector and data register addresses have to be located within the active flash memory space. the active space is that address range to which the physical flash addresses are mapped as defined by the user. when using data page pointers (dpps) for command or sector addresses one has to make sure that both msbs of the command or sector address are reflected in both lsbs of the selected dpp. only register- indirect addressing like mov [rx], ry, mov rx, [ry] can be used for command, sector or write-data accesses. direct addressing is not allowed . when performing read cycles within flash commands (e.g. read flash status register) it is not allowed to use indexed addressing mode, which is only available with instructions mov rx, [ry+#data16] and movb rx, [ry+#data16]. make sure that the c-compiler doesnt use these instructions.
semiconductor group 6 of 9 ap1642 02.99 c167cs-32f/ c161ci-32f/ C161SI-32F flash memory programming (all ax-steps) 3 memtool - the otp/ flash/ eeprom memory programming tool in-system programming of on-chip otp- flash- and eeprom memory is supported by the windows-based programming tool ?memtool which is freely available. siemens provides driver updates on the internet; please ask for the current status. memtool is an application example as well as a programming tool for on-chip otp- flash- and eeprom memory, supporting c161ci-32f, C161SI-32F, c167cr-16f, c167cs-32f and c163-16f flash devices and c164ci-8e otp devices. thanks to the modular structure memtool is easily expandable for future c16x devices. for an interested user all driver sources are also available (figure 2). along with the drivers come readme.txt files which contain informations about the hardware requirements and latest informations about memtool and each driver. figure 2 the structure of memtool memtool c163 flash driver c164 otp driver c167 flash driver driver sources driver sources driver sources c16x flash/otp/ eeprom driver driver sources
semiconductor group 7 of 9 ap1642 02.99 c167cs-32f/ c161ci-32f/ C161SI-32F flash memory programming (all ax-steps) memtool allows programming and erasing the c167cs-32f/ c161ci-32f/ C161SI-32F flash memory employing an phytec c167 starter kit, an ertec eva167 evaluation board (in case of the c161ci-32f/ C161SI-32F an additional adaptor is needed) or a customers application (free asc0 needed). the process of programming is based on the bootstrap loader (bsl). the c167cs-32f/ c161ci-32f/ C161SI-32F enters bootstrap mode if pin p0l.4 is sampled low at the end of a hardware reset. in this case the bsl is activated, independent on the selected bus mode. all software including the programming data is downloaded from a host pc into the internal ram of the microcontroller. the application requires only internal ram, external ram is not required. since the c167cs-32f/ c161ci-32f/ C161SI-32F is a 5 volt-only device, no additional voltage for flash programming or erase is required. in order to download the application from a pc, a serial link has to be established. the c167cs- 32f/ c161ci-32f/ C161SI-32F already provides an asynchronous serial interface that only has to be connected to com1 or com2 of your pc. supposing you are using a phytec c167 starter kit, you can directly connect its serial connector with the com1/ com2 interface of your pc. 3.1 special memtool options/ hints for default memtool expects serial communication via rs232. some drivers also support single- wire transmission (k-line). all drivers which support k-line protocol are marked with kl (see box target/ change/ select controller type). select the desired mode (rs232 or k-line) in box interface / setup interface. when using the k-line option transmission speed can be significantly increased by deactivating the fifo of the used communication port of the pc. this concerns windows 95 as well as windows nt. in some cases it is useful to get a log-file of the transmitted data. for log-file generation switch diaglog in the memtool configuration file (memtool.ini/ siemtool.ini; put down under [main]) has to be set to 1. the log-file will be closed by leaving memtool. a set box for the log switch is currently not implemented.
semiconductor group 8 of 9 ap1642 02.99 c167cs-32f/ c161ci-32f/ C161SI-32F flash memory programming (all ax-steps) 4 c167cs-32f/ c161ci-32f flash memory programming drivers overview several c167cs-32f/ c161ci-32f flash programming drivers are available. this is founded on different demands of different applications. the following overview is just a snapshot of the status quo. in the future new versions will be available which will partly replace the current ones. please pay attention to the readme.txt files which come along with the drivers. for C161SI-32F flash devices you can use the c161ci-32f drivers ; there are no differences concerning the flash module. due to the fact that with some steps it is not possible to perform flash read accesses as long as the test rom bootstrap loader is still active (this also includes read accesses to the flash status register fsr), the success of a flash programming/ erase operation cannot be verified. in case you are using the internal test rom bootstrap loader for booting we provide the drivers c167cs-32f blind 1st sil. , c167cs-32f kl blind 1st sil. and c161ci-32f blind 1st sil. which have some restrictions (see below). flash read accesses (this also includes read accesses to the flash status register fsr) are possible when booting from external memory (eprom, flash) or when booting (=starting a bsl routine as a user program) out of the pre-programmed internal flash memory. in case you do not use the internal test rom bootstrap loader we provide the drivers c167cs-32f full 1st sil., c167cs-32f kl full 1st sil. and c161ci-32f full 1st sil.. all c167cs-32f/ c161ci-32f flash drivers are properly tested with 9600 baud transmission rate. you may also try a higher baudrate (>= 19200 bd) for faster data transmission. for single wire transmission (k-line) we recommend to use lower baudrates (<= 19200 bd). the readme.txt files in the sub-directories (memtool/ siemdrv/ c16x...) contain important informations about each driver: note: please also refer to the dedicated errata sheet of the used c167cs-32f/ c161ci-32f/ C161SI-32F device. later steps may have not the restrictions described above . c167cs-32f full 1st sil. / c167cs-32f kl full 1st sil./ c161ci-32f full 1st sil. please use these drivers when... - booting out of external memory (which contains a bsl routine; in this case make sure that pin ea (external access) is low and pin p0l.4 is not low during reset (which would activate the internal bootstrap loader) - booting out of the pre-programmed on-chip user flash (the user flash must contain a bootstrap loader routine which will be executed as a normal user program after reset; in this case make sure that pin ea (external access) is high and pin p0l.4 is not low during reset)
semiconductor group 9 of 9 ap1642 02.99 c167cs-32f/ c161ci-32f/ C161SI-32F flash memory programming (all ax-steps) note: pin p0l.4 low during reset activates the bootstrap loader which resides in the internal test rom. when the internal bootstrap loader is selected (which means that the internal test rom is active) no read accesses to the flash memory (which also includes the flash status register) are possible. read accesses to the flash memory as well as to the flash status register fsr will always deliver value ffffh, independent on the real value. this version supports all available flash functions, performs verification of programming and erase and evaluates the flags of the fsr in case of a flash operation. note: a tested bootstrap loader (target: external memory/ internal flash memory) is attached. c167cs-32f blind 1st sil. / c167cs-32f kl blind 1st sil./ c161ci-32f blind 1st sil. these versions are recommended when programming the flash memory the first time or when using the internal test rom bootstrap loader. the internal test rom bootstrap loader can be activated with p0l.4 low during reset. the state of pin ea (external access) will be ignored. restrictions read accesses to the flash memory (which also includes the flash status register fsr) are not possible (the read value is always ffffh, independent on the real value). this is the reason why this version neither performs a verification of programming and erase nor evaluates the flags of the fsr in case of a flash operation. error flags (if set in case of a failure during a flash operation) will not being recognized and therefore not evaluated. due to this fact the success of a flash operation cannot be controlled. the success messages of the programming tool are no reliable indicators ! wait routines for each flash operation replace polling of the busy bit (fsr). note: when booting with the internal bootstrap loader all read accesses to the flash memory (and to the flash status register fsr) deliver the same dummy value ffffh, independent on the real content of the flash memory/ fsr. please consider this e.g. when working with an ertec eva167 evaluation board (btl switch in position ?on): a memory dump of the flash memory will always deliver ffffh value ! note: please also refer to the dedicated errata sheet of the used c167cs-32f/ c161ci-32f/ C161SI-32F device. later steps may have not the restrictions described above .


▲Up To Search▲   

 
Price & Availability of C161SI-32F

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X